//    Dhammapada
//    Copyright (C) 2007 Sakya
//    sakya_tg@yahoo.it
//
//    This program is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program; if not, write to the Free Software
//    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

#ifndef __dhammapada_h
#define __dhammapada_h (1)

#include "settings.h"

#define ORIGNAL_LANG "Pali"
#define MAX_SECTIONS 100
#define MAX_SECTION_ROWS 20

struct category{
    char fileName[262];
    int index;
    char title[100];
    int sectionsNumber;
};

struct categoriesIndex{
    int count;
    int totalSections;
    struct category cat[100];
};

struct section{
    int index;
    int rowsNumber;
    char rows[MAX_SECTION_ROWS][256];
};

struct oneCategory{
    char fileName[262];
    char title[100];
    int index;
    int sectionsNumber;
    int minSection;
    int maxSection;
    struct section sections[MAX_SECTIONS];
};

//Get index of categories
int loadCategoriesIndex(char *lang);
int loadCategoriesIndexOriginal();

//Load a category:
int loadCategory(int index);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Globals:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct categoriesIndex categoriesIndex;
struct categoriesIndex categoriesIndexOriginal;
struct oneCategory currentCategory;
struct oneCategory currentCategoryOriginal;

#endif
